package com.luoqiz.project.qq.client;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JButton;
import javax.swing.JFrame;

public class ClientAppMain extends JFrame {

	private static final long serialVersionUID = 8106234146395775097L;

	public ClientAppMain() {
		this.setTitle("客户端");
		this.setVisible(true);
		this.setLayout(null);
		this.setBounds(200, 200, 300, 500);
		
		JButton startChar=new JButton("打开聊天窗口");
		startChar.setBounds(10, 10, 100, 30);
		startChar.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) { 
				new ChatJFrame();
			}
		});
		this.add(startChar);
		this.addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent e) {
				System.exit(-1);
			}
		});
	}

	public static void main(String[] args) {
		new ClientAppMain();
//		new ChatJFrame();
	}
}
